//
//  KESpeechManager.swift
//  KoalaEn
//
//  Created by Wade on 2024/9/13.
//

import Foundation
//import SpeechEngineAsrToB
//import SpeechEngineTtsToB

class KESpeechManager:NSObject{

    
//    private let speechEngine = SpeechEngine()
    // 静态常量只能初始化一次
    static let sharedInstance = KESpeechManager()
    // 在私有初始化方法配置
    
    /*
     pleased、sorry、annoyed、customer_service、professional、serious、happy、sad、angry、scare、hate、surprise、tear、conniving、comfort、radio、lovey-dovey、tsundere、charming、yoga、storytelling
     22种情感/风格】通用、愉悦、抱歉、嗔怪、开心、愤怒、惊讶、厌恶、悲伤、害怕、哭腔、客服、专业、严肃、傲娇、安慰鼓励、绿茶、娇媚、情感电台、撒娇、瑜伽、讲故事
     
     教育场景       voice_type
     知性姐姐-双语    BV034_streaming    ✔
     温柔小哥    BV033_streaming    ✔
     */
    private override init() {
//        speechEngine.setStringParam(SE_LOG_LEVEL_DEBUG, forKey: SE_PARAMS_KEY_LOG_LEVEL_STRING)
//        speechEngine.setStringParam("test_user_id", forKey: SE_PARAMS_KEY_UID_STRING)
//        // appid
//        speechEngine.setStringParam("1254461879", forKey: SE_PARAMS_KEY_APP_ID_STRING)
//        
//        // token
//        speechEngine.setStringParam("Bearer;KEyKVw4MNDpM5VpoCNhNZtsrTOeoefh2", forKey: SE_PARAMS_KEY_APP_TOKEN_STRING)
////        speechEngine.setDelegate(self)
//        
//        // 设置音频发音人
//        speechEngine.setStringParam("BV034_streaming", forKey: SE_PARAMS_KEY_TTS_VOICE_ONLINE_STRING)
//        //设置音频风格
//        speechEngine.setStringParam("happy", forKey: SE_PARAMS_KEY_TTS_VOICE_TYPE_ONLINE_STRING)
    }
    static func getInstance() -> KESpeechManager {
           return sharedInstance
    }
    
    func getSpeech(text:String){
//        speechEngine.setStringParam(text, forKey: SE_PARAMS_KEY_TTS_TEXT_STRING)
//        speechEngine.send(SEDirectiveSyncStopEngine)
    }
    
}
